class Solution {
public:
    int Fibonacci(int n) {
        if (n == 1 || n == 2)
            return 1;
        int a = 1;
        int b = 1;
        int c = 0;
        n -= 2;
        while (n--)
        {
            c = a + b;
            a = b;
            b = c;
        }
        return c;
    }
};